﻿package org.davialexandre.asmtp.events
{
	import flash.events.Event;
	
	/**
	 * ...
	 * @author DefaultUser (Tools -> Custom Arguments...)
	 */
	public class SMTPResponseEvent extends Event 
	{
		public static const CONNECTED:String = "Connected";
		public static const CLOSING_CONNECTION:String = "Closing connection";
		public static const RESPONSECODE_RECEIVED:String = "Response code received";
		private var _code:uint;
		
		public function SMTPResponseEvent(type:String, code:uint, bubbles:Boolean=false, cancelable:Boolean=false) 
		{ 
			super(type, bubbles, cancelable);
			this._code = code;
			
		} 
		
		public function get code():uint {
			return _code;
		}
		
		public override function clone():Event 
		{ 
			return new SMTPResponseEvent(type, bubbles, cancelable);
		} 
		
		public override function toString():String 
		{ 
			return formatToString("SMTPResponseEvent", "type", "bubbles", "cancelable", "eventPhase"); 
		}
		
	}
	
}